package com.group.yztcedu.playlive.main.me.model;

import android.content.Context;
import android.database.Cursor;

import com.group.yztcedu.playlive.bean.MyDataBean;
import com.group.yztcedu.playlive.db.MySQLiteOpenHelper;
import com.group.yztcedu.playlive.main.me.View.IMeActivity;

import java.util.List;

/**
 * Created by Administrator on 2016/8/7.
 */
public class MyActivityFragmentModel implements IMyActivitymodel{
    @Override
    public void onLoadData(String sql,Context context, OnLoadCategoryListener listener) {

        MySQLiteOpenHelper mySQLiteOpenHelper = new MySQLiteOpenHelper(context);
        Cursor cursor = mySQLiteOpenHelper.selectCursor(sql, null);
        List<MyDataBean> dataBeen = mySQLiteOpenHelper.cursorToList(cursor);
        listener.onSuccess(dataBeen);
    }
}
